home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 112 / EnigmaAmiga112CD.iso / dalla rivista / awnpipe / awnp / awnp-docs / overview.doc < prev    next >
Text File  |  2000-05-18  |  4KB  |  64 lines

  1.  The pipe function sections are NOT required reading to learn how to build GUI's.
  2.  
  3.  Using AWNPipe
  4.  -------------
  5.  
  6. All of AWNPipes functions are accessed through a pipe like interface as the name implies. Pipes are accessed like any other type of file using open, close, read, and write. From Amiga DOS a pipe can be used almost any place you would normally use a file name.
  7.  
  8. The name of each pipe starts with the device name 'awnpipe:'. This is followed by a unique name that is used to identify the pipe. The name MAY also be followed by a '/' and some option information to give the pipe special abilities. 'awnpipe:myfile' and 'awnpipe:test' are examples of pipe names.
  9.  
  10. The options after the '/' usually cause the data to be altered as it passes into the pipe. Then data you read out from the pipe will be different than the data you wrote into it. The '/h' function works this way, any '&' written into the pipe will be read back as '&'.
  11.  
  12. Some other options connect the pipe to special hosts like the clipboard. Data written to a pipe ending in '/c0' goes into the clipboard unit 0. The data read from a pipe ending in '/v0' will be the contents of clipboard unit 0.
  13.  
  14. Here is a simple example showing data going in and out of a pipe.
  15.  
  16. echo "hello World" > AWNPipe:test
  17. type AWNPipe:test
  18.  
  19.  
  20. This following information is intended as a reference for people already familiar with AWNP. To learn how to use pipe functions work through the tutorials.
  21.  
  22.  Pipe Types
  23.  ----------
  24.  
  25. /I immediate   /U unHTML        /E execute    /L link
  26. /R read        /P Postaweb      /O <option>   /V[unit#] readclip
  27. /W write       /! do not wait   /B backwards  /C[unit#] writeclip
  28. /H HTML        /T tap           /F force      /S status
  29. /G HTML2       /A Abort         /-vers# minimum version
  30. /@ seek enable /M Multiple Opens   /1 open first end
  31.  
  32. /x[option] extra function
  33.       /xc open interactive Class Act pipe
  34.       /xcr[filename] open interactive Class Act pipe, reading the window and gadget definitions from a separate file.
  35.       /xcw[filename] open interactive Class Act window, writing the events to a separate file.(also sets immediate and force)
  36.       /xm[c]    string pattern match c=case sensitive
  37.       /xm[c]w    string pattern match c=case sensitive results to separate file
  38.       /xm[c]r    string pattern match c=case sensitive reading data from separate file. (also sets immediate and force)
  39.       /x0 programmable replace loopback
  40.       /x0r[filename] programmable replace from file
  41.       /x0w[filename] programmable replace to file
  42.       /xk remove keystrokes from input event stream and notify
  43.       /xe write keystrokes to the input event stream from code & qual
  44.       /xea write keystrokes to the input event stream from ANSI source
  45.       /xt[filename] query icon tooltypes
  46.       /xi[filename] read tooltype information for a file.
  47.  
  48. Details about AWNPipe
  49. ---------------------
  50.  
  51. AWNPipe:test/h AWNPipe:test AWNPipe:test/h/f/rhelpme are all the same file. The unique name terminates on the first '/' or the end of the name if no '/' is found. '%' may be substituted for  '/' .
  52.  
  53. A pipe name is usually only opened twice. After that calls to open will fail. After both ends of the pipe are closed the pipe name can  be used again. A pipe can immediately be written after it is opened, even if the other end has not yet been opened. Some special options can override this behavior.
  54.  
  55. Some types of pipes are only opened ONCE. The second end of these pipes are automatically connected to something by the AWNPipe internal code. Clipboard access is an example of this type of pipe.
  56.  
  57. All file handles can both read or write data. A check is made to see if pipes dead lock from pending reads on both ends. If this happens both of the pending reads are aborted to break the deadlock.
  58.  
  59. Data flow is never stopped by buffering.
  60.  
  61. If data is written into a pipe and the second end never opened, the pipe stores all written data.... forever  (until you reboot).
  62.  
  63.  
  64.